package com.yunji.system.mapper;

import com.yunji.common.model.dto.SysRoleDTO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ISysCommonMapper {

    @Select("select belong_name from v3_belong where belong_id = #{belongId} and del_flag = 0")
    String getBelongName(Long belongId);

    @Select("select * from sys_role where role_id in (select role_id from sys_user_role where user_id = #{userId} ) and del_flag = 0")
    List<SysRoleDTO> getRoleListByUserId(Long userId);
}
